const query=require('querystring')

const customBodyQuery=(req,res,next)=>{

    let str=''
    req.on('data',(chunk)=>{
        str+=chunk
    })

    req.on('end',()=>{
        const body=query.parse(str)
        req.body=body
        next()
    })
}

module.exports=customBodyQuery